package com.bicon.bdata_service_search.es.service;

import com.bicon.bdata_service_search.es.bean.ResultAskAnswerListBean;
import com.bicon.bdata_service_search.es.entities.QuestionAndAnswer;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * 描述:
 * service
 *
 * @author zhaoyu
 * @email zhaoyu@vv.cc
 * @create 2018-08-23 10:08
 */
public interface ESQuestionAndAnswerService {

    Page<QuestionAndAnswer> findAll();

    //    Page<QuestionAndAnswer> findByAsk_content(String ask_content, Pageable pageable);
    Page<QuestionAndAnswer> findByAskContentIsLike(String ask_content, Pageable page);

    Page<QuestionAndAnswer> findByAskTitleIsLike(String ask_content, Pageable page);

    Page<QuestionAndAnswer> findByAskContentLike(String askTitle, Pageable pageable);

    Page<QuestionAndAnswer> queryByAskContentLessThan(String askTitle, Pageable pageable);

    Page<QuestionAndAnswer> findByAskContent(String askContent, Pageable pageable);

    Page<QuestionAndAnswer> esFind1(String askContent, Pageable pageable);

    //    Page<QuestionAndAnswer> queryByAskContentIsLike(String askTitle, Pageable pageable);
    Page<QuestionAndAnswer> getByAskContentMd5Is(String askContentMd5, Pageable pageable);

    ResultAskAnswerListBean getResultAskAnswerListBean(Page<QuestionAndAnswer> questionAndAnswers);


    Page<QuestionAndAnswer> search(String askContent, Pageable pageable);
//    QuestionAndAnswer findById(String Id);
    Page<QuestionAndAnswer> clientSearch(String askContent, Pageable pageable);


}